#include "tooltipeventhandler.hpp"

ToolTipEventHandler::ToolTipEventHandler(QObject *parent) :
    QObject(parent)
{
}


bool ToolTipEventHandler::eventFilter(QObject *obj, QEvent *event)
{
    if (event->type() == QEvent::ToolTip)
    {
	QHelpEvent *helpEvent = static_cast<QHelpEvent*>(event);

	emit tooltipRequested(new QPoint(helpEvent->pos()));
	return true;
    }

    return QObject::eventFilter(obj, event);
}
